<?php
    
    /**
     * Created by PhpStorm.
     * User: Administrator
     * Date: 2017/4/12
     * Time: 10:48
     */
    class Cetacean extends Animals
    {
        public $kind="鲸鱼";
    
        /**
         * Cetacean constructor.
         * @param $weight
         * @param $age
         * @param $name
         */
        function __construct($weight,$age,$name)
        {
            $this->weight = $weight;
            $this->age = $age;
            $this->name = $name;
            echo "动物构造函数结束"."体重是：".$weight."年龄是：".$age."名字是".$name."<br>";
        }
    
        /**
         * @return string
         */
        public function getKind(): string
        {
            return $this->kind;
        }
        public function call(){
            echo $this->kind."会喷水"."<br>";
        }
    }